package com.kc.controller;

import com.kc.entity.Teacher;
import com.kc.dao.TestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/demo")
public class TestController {

    @Autowired
    private TestMapper testMapper;

    @GetMapping("/findall")
    public List<Teacher> SelectAll(){
        List<Teacher> list = testMapper.selectList(null);
        System.out.println(list);
        return list;
    }
}